package com.founder.sample;

import java.util.Date;

import com.founder.entity.Order;
import com.founder.tool.xml.Entity2Xml;
import com.founder.tool.xml.StringUtil;

public class ObjectToXml {
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
    	String name = "中国";
    	Date date = StringUtil.parseDate("2012-02-01 00:00:00");
    	long orderId = 10;
    	Order order = new Order();
    	order.setName(name);
    	order.setDate(date);
    	order.setOrderId(orderId);
    	
    	//对象转XML
    	Entity2Xml e2x = new Entity2Xml(order);
    	String xml = e2x.toString();
    	System.out.println("Xml: " + xml);
	}

}
